#include <iostream>
#include <ostream>

using namespace std;

class Line{
public:
 Line(int x1, int y1, int x2, int y2)
 :_p1(x1, y1)
 ,_p2(x2, y2)
 {}


//public:
private:
 class Point{
 public:
     Point(int x, int y)
     :_x(x)
     ,_y(y)
     {}

 friend ostream & operator<<(ostream & os, const Line::Point & rhs);
 //friend ostream & operator<<(ostream & os, const Line::Point & rhs);

 private:
     int _x;
     int _y;
 };

 friend ostream & operator<<(ostream & os, const Line & rhs);

 friend ostream & operator<<(ostream & os, const Line::Point & rhs);


private:
 Point _p1;
 Point _p2;
};

ostream & operator<<(ostream & os, const Line & rhs){
 os << rhs._p1 << "------>" << rhs._p2;
 return os;
}

ostream & operator<<(ostream & os, const Line::Point & rhs){
 os << "(" << rhs._x << "," << rhs._y << ")";
 return os;
}
void test(){
    Line line(1,2,3,4); 
    Line::Point pt1(1,2);

}

int main()
{
    test();
    return 0;
}
